package com.lj.frame.file.entity;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;

public class LocalFile {


    public static void putObject(String bucketName, String path, InputStream inputStream) throws IOException {
        FileOutputStream outputStream = new FileOutputStream(bucketName+path);
        byte[] bytes = new byte[1024];
        int count = 0;
        while (true){
            count = inputStream.read(bytes);
            if (count == -1){
                break;
            }
            outputStream.write(bytes, 0, count);
        }
    }
}
